#include <bits/stdc++.h>
#define int long long
using namespace std;


const int maxn = 2e5 + 5;
int diff[maxn];
void solve(){
	int n, w;
	cin >> n >> w;
	int s, t, p;
	for (int i=1;i<=n;i++) {
		cin >> s >> t >> p;
		diff[s] += p;
		diff[t] -= p;
	}
	
	for (int i=1;i<=n;i++) {
		diff[i] = diff[i-1] + diff[i];
		if (diff[i] > p) {
			cout << "No\n";
			return;
		}
	}
	cout << "Yes\n";
}




signed main(){
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int t;
	t=1;
	while(t--){
		solve();
	}
	return 0;
}
